<?php

class Animal
{
    public $name;
    public static $name2 = "lisi";

    public function __construct($name)
    {
        $this->name = $name;
    }

    public function eat()
    {
        echo self::$name2 . " is eating";
    }

}

class Dog extends Animal
{
    function meow()
    {
        parent::eat();
        echo "hello meow";
    }
}


$animal = new Animal('dog');
$dog = new Dog('xiaoming');
$animal->eat();

$dog->meow();



